OpenCV from the very beginning

This is a tutorial that should get you up and running with OpenCV as fast as possible. The emphasis is on practical, quick, python-based image analysis and manipulation with pointers to a lot of the gotchas. It's not on principles or theory: if you want that, read a book:-)

(I recommend : [https://www.amazon.co.uk/Image-Processing-Analysis-Machine-Vision/dp/1133593607/ref=dp_ob_image_bk] for a thorough and clear image processing base as well as a computer vision intro. I also recommend [http://szeliski.org/Book/] which is clear, vision rather than image processing based, and available online)

First things first

Install. Things to install:

Testing OpenCV installation

If that's worked you can go to the samples directory and run some code to test it. On linux or mac, change to the right directory (you'll find "samples" under opencv-3.1.0) then type ./edge.py

hannah@loganberry ~/Downloads/opencv-3.1.0/samples/python $ ./edge.py

If you get a window with some trackbars and edge-detected output of your webcam, you're good to go. To run the same test in Windows, try opening the edge.py file in your Python editor of choice (e.g. Idle) and selecting run.

Final setup

If you've downloaded all the files from github, and you've tested the OpenCV install with edge detection and the webcam, the next step is the jupyter notebook. Get yourself a new directory for the OpenCV tutorial, and get a copy of the following github repository:

[https://github.com/handee/opencv-gettingstarted]. You can do this by selecting "download zip" if you don't have git installed.

Once you've got that, navigate to the directory that contains the tutorial material, and type

jupyter notebook

which will start a notebook server. Notebooks let you mix python code and documentation - this is a jupyter notebook, and the next few steps of the tutorial are jupyter notebooks too.


In [ ]: